﻿using Forum.BaseController;
using Forum.Service.Interface;

namespace Forum.Controllers
{
    /// <summary>
    /// 配置参数
    /// </summary>
    [Route("Api/Parameter")]
    public class ParameterController : BaseController<IParameterService>
    {
        public ParameterController(IParameterService defaultService, ILogger<BaseController<IParameterService>> logger) : base(defaultService, logger)
        {
        }

        /// <summary>
        /// 获取配置参数（选项集）
        /// </summary>
        /// <returns></returns>
        [HttpGet("GetStatusList")]
        public ApiResponse<List<SysParameters>> GetStatusList()
        {
            var statusList = DefaultService.GetStatusList();
            return statusList == null ? ApiResponse.NotFound() : new ApiResponse<List<SysParameters>>(statusList);
        }
    }
}
